class CreatePatientDatas < ActiveRecord::Migration
  def self.up
    create_table :patient_datas do |t|
      t.string :first_name
      t.string :laste_name
      t.integer :sex_id
      t.string :street
      t.string :street_number
      t.string :city
      t.string :zip_code
      t.string :email
      t.string :pesel
      t.string :telpehone_number
      t.date :birth_date
      t.integer :user_id
      t.timestamps
    end

    PatientData.create :first_name => "Damian",
      :laste_name => "Pieczyńskii",
      :street => "Sudecka",
      :sex_id => 1,
      :street_number => "27/3",
      :city => "Wroclaw",
      :zip_code => "37-700",
      :email => "dsad@fdsa.pl",
      :pesel => "12345678911",
      :telpehone_number => "678896710",
      :birth_date => '06/02/1945',
      :user_id => 1
  end

  def self.down
    drop_table :patient_datas
  end
end
